<template>
  <div class="member-manage">
    <el-row :span="24" class="table-btn">
      <el-button type="primary" icon="el-icon-plus" @click="addMember">添加人员</el-button>
      <el-button type="primary" @click="positionSet">部门设置</el-button>
      <el-button type="primary" :disabled="selectMemberId.length == 0" @click="authSet">调整角色</el-button>
      <el-button type="primary" :disabled="selectMemberId.length == 0" @click="delMemeber">移出企业</el-button>
    </el-row>
    <el-table
      class="member-list"
      :data="memberData"
      style="width: 100%"
      :cell-style="cellStyle"
      :header-cell-style="tableHeaderTh"
    >
      <el-table-column
        width="55"
        label=""
        align="center"
      >
        <template slot-scope="scope">
          <label class="checkBox">
            <input class="select-member-input" type="checkbox" v-model="selectMemberId" :value="scope.row.memberUserId" :data-name="scope.row.muUsername" name="checkMemberId">
          </label>
        </template>
      </el-table-column>
      <el-table-column
        type="index"
        label="序号"
        width="100"
        align="center"
      />
      <el-table-column
        prop="muname"
        label="姓名"
        width="250"
        align="left"
      >
        <template slot-scope="scope">
          <div class="table-name">
            <span class="text userImg"><img src="https://img2.baidu.com/it/u=3228549874,2173006364&fm=26&fmt=auto&gp=0.jpg" alt=""></span>
            <span class="text userName" :title="scope.row.muname ? scope.row.muname : '暂无姓名'">{{ scope.row.muname ? scope.row.muname : '暂无姓名' }}</span>
            <span class="text userRole" v-if="scope.row.muRole == 1 || scope.row.muRole == 2 || scope.row.muRole == 3">
              <i class="icon label" v-if="scope.row.muRole == 1">管理员</i>
              <i class="icon label" v-else-if="scope.row.muRole == 2">成员</i>
              <i class="icon label" v-else-if="scope.row.muRole == 3">普通员工</i>
            </span>
          </div>
        </template>
      </el-table-column>
      <el-table-column
        prop="muUsername"
        label="用户名"
        width="300"
        align="center"
      />
      <el-table-column
        prop="muPhone"
        label="手机号"
        width="250"
        align="center"
      />
      <el-table-column
        prop="department"
        label="部门"
        show-overflow-tooltip
        align="center"
      >
        <template slot-scope="scope">
          <div class="table-department">
            <popover 
              placement="bottom"
              trigger="click"
              width="110"
              :listData="departmentList"
              @clickPopover="updataDepartment(arguments[0],scope.row.memberUserId)"
              :title="scope.row.muDepartmentName ? scope.row.muDepartmentName : '--空--'"
            />
          </div>
        </template>
      </el-table-column>
      <el-table-column
        prop="position"
        label="职位"
        width="250"
        align="center"
      >
      <template slot-scope="scope">
          <div class="table-position">
            <popover 
              placement="bottom"
              trigger="click"
              width="110"
              @clickPopover="updataPosition(arguments[0],scope.row.memberUserId)"
              :title="scope.row.muPositionName ? scope.row.muPositionName : '员工'"
              :listData="positionList"
            />
          </div>
      </template>
      </el-table-column>
      <el-table-column
        label="详情"
        width="150"
        align="center"
      >
        <template slot-scope="scope">
          <el-button type="text" @click="selectMember(scope.row)">详情</el-button>
        </template>
      </el-table-column>
    </el-table>
    <el-pagination
      background
      layout="prev, pager, next"
      :total="total"
      :current-page.sync="page"
      :page-size.sync="size" 
      @current-change="getMemeberList()" />
    <!-- 添加成员 -->
    <Dialog
      ref = "addMemberRef"
      :isFooterShow = "false"
      title="添加成员"
      width="480px">
      <div class="add-member-dialog-body">
        <div class="dialog-content-wrap">
          <p class="hint-title">链接邀请(只能通过微信或者企业微信分享)</p>
          <div class="dialog-content">
            <div class="link-wrap">
              <p class="link-text">{{ wxShareLink }}</p>
              <textarea name="" id="" cols="30" rows="10" style="position: absolute;top: -999px;left: -999px;" v-model="wxShareLink" ref="copyText"></textarea>
              <el-button type="text" class="copy-btn" @click="copyClick">复制</el-button>
            </div>
          </div>
        </div>
        <div class="dialog-content-wrap">
          <p class="hint-title">二维码邀请</p>
          <div class="dialog-content">
            <div class="code-img">
              <img :src="codeImgUrl" alt="">
            </div>
            <p class="text"><el-button type="primary" class="save-btn" @click="saveCodeImg">保存二维码</el-button></p>
            <p class="text">将二维码保存到本地</p>
            <p class="text">把二维码发送给有需要的人</p>
          </div>
        </div>
      </div>
    </Dialog>
    <!-- 调整角色 -->
    <Dialog
      ref = "setAuditRef"
      :isFooterShow="true"
      title="调整角色"
      width="280px">
      <div class="set-audit-dialog-body">
        <div class="select"><label class="checkBox"><input class="box“" type="radio" v-model="selectRole" name="roleMember" value="1">管理员</label></div>
        <div class="select"><label class="checkBox"><input class="box“" type="radio" v-model="selectRole" name="roleMember" value="2">成员</label></div>
        <div class="select"><label class="checkBox"><input class="box“" type="radio" v-model="selectRole" name="roleMember" value="3">普通成员</label></div>
      </div>
      <template>
        <div class="set-audit-dialog-fotter" slot="fotter">
          <el-button class="dialog-btn" @click="closeDialog">取消</el-button>
          <el-button class="dialog-btn" type="primary" @click="setRole">确定</el-button>
        </div>
      </template>
    </Dialog>
    <!-- 部门设置 -->
    <Dialog
      ref="setPositionRef"
      :isFooterShow = "false"
      title="部门设置"
      width="450px">
      <div class="set-position-dialog-body">
        <div class="item department-item">
          <div>
            <el-input placeholder="添加新的部门" class="input" v-model="departInput"></el-input>
            <el-button class="add-department-btn add-btn" @click="addepart"><i class="el-icon-plus"></i></el-button>
          </div>
          <div class="department-label label-list">
            <span class="label" v-for="item in departmentList" :title="item.name">{{ item.name.length > 29 ? item.name.substr(0,29) + '...' : item.name}}<i class="el-icon-error close" @click="delDepartment(item.id)"></i></span>
          </div>
        </div>

        <div class="item position-item">
          <div>
            <el-input placeholder="添加新的职位" class="input" v-model="positionInput"></el-input>
            <el-button class="add-position-btn add-btn" @click="addposit"><i class="el-icon-plus"></i></el-button>
          </div>
          <div class="position-label label-list">
            <span class="label" v-for="item in positionList">{{ item.name }}<i class="el-icon-error close" @click="delPosition(item.id)"></i></span>
          </div>
        </div>
      </div>
    </Dialog>
    <!-- 查看详情 -->
    <Dialog
      ref="selectMemberRef"
      :isFooterShow = "false"
      title="个人详情"
      @dialogClose="UserDetailClo"
      width="850px">
      <div class="select-member-dialog-body" v-if="memberDetail">
        <el-row>
          <el-col :span="24">
            <div>
              <span class="userImg"><img src="https://img1.baidu.com/it/u=2496571732,442429806&fm=26&fmt=auto&gp=0.jpg" alt=""></span>
              <span class="userName">{{ memberDetail.muUsername }}</span>
            </div>
          </el-col>
        </el-row>
        <div class="userMsg">
          <el-row>
            <el-col :span="6">用户名：{{ memberDetail.muUsername }}</el-col>
            <el-col :span="5">性别：{{ memberDetail.muUsername == 0 ? '女' : memberDetail.muUsername == 1 ? '男' : '未知' }}</el-col>
            <el-col :span="7">部门/职位：{{ memberDetail.muDepartmentName ? memberDetail.muDepartmentName : '--空--' }}/{{ memberDetail.muPositionName ? memberDetail.muPositionName : '员工' }}</el-col>
            <el-col :span="6">加入时间：{{ memberDetail.muJoinDate | parseTime('{y}-{m}-{d}') }}</el-col>
          </el-row>
          <el-row>
            <el-col :span="6">手机号：{{ memberDetail.muPhone }}</el-col>
            <el-col :span="5">地区：{{ memberDetail.muAddress }}</el-col>
            <el-col :span="7">传播人数：{{ memberDetail.totalCount }}</el-col>
            <el-col :span="6">企业微信：{{ memberDetail.muWxWorkId }}</el-col>
          </el-row>
        </div>
        <div class="relevance-table">
          <p style="color: rgba(51, 51, 51, 0.85);">关联关系</p>
          <el-table
            border
            :data="spreadUserData"
            style="width: 100%"
          >
            <el-table-column
              type="index"
              label="序号"
              width="144"
              align="center"
            />
            <el-table-column
              prop="muUsername"
              label="用户名"
              width="144"
              align="center"
            />
            <el-table-column
              prop="muPhone"
              label="手机号"
              width="144"
              align="center"
            />
            <el-table-column
              prop="muAddress"
              label="地区"
              width="145"
              align="center"
            />
            <el-table-column
              prop="muJoinDate"
              label="关联日期"
              width="144"
              align="center"
            >
              <template slot-scope="scope">
                <div>
                  {{ scope.row.muJoinDate | parseTime('{y}-{m}-{d}') }}
                </div>
              </template>
            </el-table-column>
          </el-table>
          <el-pagination
            background
            layout="prev, pager, next"
            :total="spreadUserTotal"
            :current-page.sync="spreadUserPage"
            :page-size.sync="spreadUserSize" 
            @current-change="getSpreadUserList()" />
        </div>
      </div>
      <div class="select-member-dialog-body" v-else>暂无数据</div>
    </Dialog>
  </div>
</template>

<script>
import { mapGetters } from 'vuex'
import Dialog from '../components/dialog'
import popover from '../components/popover'
import { 
  getMemeberAll,
  getPosition,
  getDepartment,
  updataMember,
  deletePosition,
  deleteDepartment,
  addDepartment,
  addPosition,
  getSpreadUser,
  deleteAllMember,
  searchMember,
  updataMemberRole
} from '@/api/auth-manage'
import { parseTime } from '@/utils/index' 
export default {
  name: 'MemberList',
  data() {
    return {
      cellStyle: {
        'height': '54px',
        'font-weight': '400',
        'color': 'rgba(0, 0, 0, 0.65)'
      },
      tableHeaderTh: {
        'background-color': '#fafafa',
        'border-bottom': '0',
        'text-align': 'center',
        'height': '54px',
        'color': 'rgba(0, 0, 0, 0.85)'
      },
      memberData: [],
      positionList:[],
      departmentList:[],
      departInput: '',
      positionInput: '',
      memberUserId: 5,
      memberDetail: null,
      page: 1,
      size: 20,
      total: 0,
      spreadUserData: [],
      spreadUserTotal: 0,
      spreadUserPage: 1,
      spreadUserSize: 20,
      selectMemberId: [],
      selectRole: 1,
      wxShareLink: '7897897845456',
      isSearch: false,
      searchText: '',
      memberUserId: null,
      codeImgUrl: 'https://img1.baidu.com/it/u=2943682230,1849451711&fm=26&fmt=auto&gp=0.jpg',
      selectMemberName: []
    }
  },
  filters: {
    parseTime: parseTime
  },
  components: {
    Dialog,
    popover
  },
  computed: {
    ...mapGetters([
      'name'
    ])
  },
  created() {
    this.getMemeberList()
    this.getPositionList()
    this.getDepartmentList()
  },
  methods: {
    addMember() {
      this.$refs.addMemberRef.open()
      console.log('添加人员')
    },
    positionSet() {
      this.$refs.setPositionRef.open()
      console.log('部门设置')
    },
    authSet() {
      this.$refs.setAuditRef.open()
      console.log('调整角色')
    },
    // 移出企业
    delMemeber() {
      let _this = this
      let str = _this.getSelUserName()
      _this.$confirm('您是否要将'+str.substr(0,str.length-1)+'移出企业?', '', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning'
      }).then(() => {
        deleteAllMember({id :_this.selectMemberId}).then(response => {
          _this.$message({
            showClose: true,
            message: '已删除',
            type: 'success'
          })
          _this.selectMemberId = []
          _this.getMemeberList()
        })
      })
    },
    // 复制链接
    copyClick() {
      this.$refs.copyText.select();
      document.execCommand('copy')
      this.$message({
        showClose: true,
        message: '已复制',
        type: 'success'
      });
    },
    // 保存二维码
    saveCodeImg() {
      this.downloadImg(this.codeImgUrl,'code')
    },
    // 下载图片到本地
    downloadImg(url, name) {
      let canvas = document.createElement('canvas'),
          ctx = canvas.getContext('2d'),
          img = new Image();
      img.crossOrigin = 'Anonymous';
      img.onload = function() {
          canvas.height = img.height;
          canvas.width = img.width;
          ctx.drawImage(img, 0, 0);
          let dataURL = canvas.toDataURL('image/png');
          let a = document.createElement('a');
          a.href = dataURL;
          a.download = name;
          document.body.appendChild(a);
          a.click();
          setTimeout(() => {
              document.body.removeChild(a);
              canvas = null;
          }, 1000);
      };
      img.src = url+"&time="+ new Date().getTime();
    },
    // 修改角色
    setRole() {
      console.log('确认修改'+this.selectRole)
      let _this = this
      updataMemberRole({muRole:Number(_this.selectRole),memberUserIds: _this.selectMemberId}).then(response => {
        _this.getMemeberList()
        _this.$refs.setAuditRef.close()
        _this.selectMemberId = []
      })
    },
    closeDialog() {
      this.$refs.setAuditRef.close()
    },
    // 查看详情
    selectMember(data) {
      this.memberDetail = data
      this.memberUserId = data.memberUserId
      this.getSpreadUserList()
      this.$refs.selectMemberRef.open()
    },
    // 关闭详情弹框
    UserDetailClo() {
      this.memberDetail.totalCount = 0
      this.spreadUserData = []
      this.spreadUserPage = 1
    },
    // 获取成员列表
    getMemeberList() {
      let data = {
        pageNo: this.page,
        pageSize: this.size
      }
      if(!this.isSelect){
        getMemeberAll(data).then(response => {
          this.memberData = response.data.datas
          this.total = response.data.totalCount
        })
      }else{
        this.searchMemberList()
      }
    },
    // 搜索成员
    searchMemberList(searchInput) {
      if(searchInput === '') {
        this.page = 1
        this.isSearch = false
        this.searchText = ''
        this.selectMemberId = []
        this.getMemeberList()
        return
      } else if(typeof searchInput !== 'undefined'){
        this.page = 1
        this.isSearch = true
        this.selectMemberId = []
        this.searchText = searchInput
      } 
      let data = {
        pageNo: this.page,
        pageSize: this.size,
        searchText: this.searchText
      }
      searchMember(data).then(response => {
        this.memberData = response.data.datas
        this.total = response.data.totalCount
      })
    },

    // 获取部门列表
    getPositionList() {
      getPosition().then(response => {
        this.positionList = response.data.map((item) => {
          return { id: item.positionId,name: item.pName}
        })
      })
    },
    // 获取职位列表
    getDepartmentList() {
      getDepartment().then(response => {
        this.departmentList = response.data.map((item) => {
          return { id: item.departmentId,name: item.dName}
        })
      })
    },
    // 修改部门信息
    updataDepartment(department,memberUserId) {
      this.setPosition({memberUserId:memberUserId,muDepartmentId:department.id});
    },
    // 修改职位信息
    updataPosition(position,memberUserId) {
      this.setPosition({memberUserId:memberUserId,muPositionId:position.id});
    },
    // 添加部门
    addepart() {
      if(this.departInput.trim() === ''){
        this.$message.error('输入内容不能为空');
      } else if(this.departInput.length > 64){
        this.$message.error('输入内容超出限制');
      } else{
        addDepartment({dName: this.departInput}).then(response => {
          this.$message({
            showClose: true,
            message: '添加成功',
            type: 'success'
          });
          this.getDepartmentList()
          this.departInput = ''
        })
      }
    },
    // 添加职位
    addposit() {
      if(this.positionInput.trim() === ''){
        this.$message.error('输入内容不能为空');
      } else if(this.positionInput.length > 64){
        this.$message.error('输入内容超出限制');
      } else {
        addPosition({pName: this.positionInput}).then(response => {
          this.$message({
            showClose: true,
            message: '添加成功',
            type: 'success'
          });
          this.getPositionList()
          this.positionInput = ''
        })
      }
    },
    // 删除部门
    delPosition(id) {
      let _this = this
      this.$confirm('删除后此职位下的人员将不再有职位属性,是否确认删除?', '', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning'
      }).then(() => {
        deletePosition({id: id}).then(response => {
          _this.$message({
            showClose: true,
            message: '已删除',
            type: 'success'
          });
          _this.getMemeberList()
          _this.getPositionList()
        })
      })
    },
    // 删除职位
    delDepartment(id) {
      let _this = this
      _this.$confirm('删除后此部门下的人员将不再有部门属性,是否确认删除?', '', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning'
      }).then(() => {
        deleteDepartment({id: id}).then(response => {
          _this.$message({
            showClose: true,
            message: '已删除',
            type: 'success'
          });
          _this.getMemeberList()
          _this.getDepartmentList()
        })
      })
    },
    // 查看关联关系
    getSpreadUserList() {
      getSpreadUser({
        memberUserId: this.memberUserId,
        pageNo: this.spreadUserPage,
        pageSize: this.spreadUserSize
      }).then(response => {
        this.memberDetail.totalCount = response.data.totalCount
        this.spreadUserTotal = response.data.totalCount
        this.spreadUserData = response.data.datas
      })
    },
    // 设置成员信息
    setPosition(data) {
      updataMember(data).then(response => {
        this.$message({
          showClose: true,
          message: '修改成功',
          type: 'success'
        });
        this.getMemeberList()
      })
    },
    dropWhile(arr,value) {
      return arr.some((item, i) => {
        if (item == value) {
          arr.splice(i, 1);
          return true
        }
      })
    },
    getSelUserName() {
      let memberList = document.querySelectorAll('.member-manage .select-member-input:checked');
      let nameStr = ''
      memberList.forEach((item) => {
        let name = item.dataset.name;
        nameStr += name + ','
      })
      return nameStr.substr(0,nameStr.length - 1);
    }
  }
}
</script>

<style lang="scss" scoped>
input[type='checkbox']{
    display: inline-block;
    width: 18px;
    height: 18px;
    font-size: 0;
    border-radius: 2px;
    border: 1px solid #015DFF;
    cursor: pointer;
    background-color: #fff;
    -webkit-appearance:none;
    outline: none;
    &:checked{
      &:after{
        display: inline-block;
        margin: 2px;
        width: 12px;
        height: 12px;
        background: #015DFF;
        border-radius: 2px;
        content: "",
      }
    }
}
input[type='radio']{
    display: inline-block;
    width: 18px;
    height: 18px;
    font-size: 0;
    border-radius: 2px;
    border: 1px solid #015DFF;
    cursor: pointer;
    background-color: #fff;
    -webkit-appearance:none;
    outline: none;
    &:checked{
      &:after{
        display: inline-block;
        margin: 2px;
        width: 12px;
        height: 12px;
        background: #015DFF;
        border-radius: 2px;
        content: "",
      }
    }
}
.member-manage{
  padding: 30px;
  background-color: #fff;
  .table-btn{
    padding: 0 0 30px 0;
    text-align: right;
    button{
      min-width: 100px;
      padding: 7px 14px;
      background-color: #015DFF;
      border-radius: 4px;
      font-size: 14px;
      font-family: PingFangSC-Regular, PingFang SC;
      font-weight: 400;
      line-height: 24px;
      color: #fff;
    }
    button.is-disabled{
      border: 1px solid #ccc;
      color: #9C9C9C;
      background-color: #fff;
    }
  }
  .member-list{
    font-size: 14px;
    font-family: PingFangSC-Medium, PingFang SC;
    font-weight: 500;
    color: rgba(0, 0, 0, 0.85);
    line-height: 22px;
    .table-name{
      display: flex;
      align-items: center;
      font-style: 0;
      .text{
        display: inline-block;
      }
      .userImg{
        width: 30px;
        height: 30px;
        margin-right: 26px;
        border-radius: 50%;
        overflow: hidden;
        vertical-align: middle;
        img{
          width: 100%;
          height: 100%;
        }
      }
      .userName{
        max-width: 100px;
        margin-right: 10px;
        line-height: 22px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
      }
      .userRole{
        // width: 43px;
        height: 18px;
        border-radius: 2px;
        border: 1px solid #015DFF;
        box-sizing: border-box;
        color: #015DFF;
        line-height: 16px;
        text-align: center;
        .label{
          display: inline-block;
          height: 100%;
          font-style: normal;
          font-size: 10px;
          -webkit-transform:scale(0.83);
        }
      }
    }
  }
  .el-pagination{
    margin-top: 20px;
    text-align: center;
  }
  .add-member-dialog-body{
    padding: 20px 35px;
    .dialog-content-wrap{
      margin-bottom: 27px;
      font-size: 14px;
      font-family: PingFangSC-Regular, PingFang SC;
      font-weight: 400;
      color: rgba(0, 0, 0, 0.85);
      .hint-title{
        margin: 16px 0;
        line-height: 20px;
      }
      .dialog-content{
        .link-wrap{
          padding: 17px 0 17px 22px;
          background: #F6F6F6;
          .copy-btn{
            width: 68px;
            padding: 0;
            color: #015DFF;
            line-height: 20px;
            vertical-align: top;
          }
          .link-text{
            display: inline-block;
            width: calc(100% - 68px);
            margin: 0;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            color: #015DFF;
            line-height: 20px;
          }
        }
        
        .code-img{
          width: 156px;
          margin: 24px auto 15px;
          border-radius: 8px;
          overflow: hidden;
          img{
            width: 156px;
            height: 156px;
          }
        }
        .text{
          margin: 0;
          line-height: 20px;
          text-align: center;
        }
        .save-btn{
          width: 204px;
          height: 44px;
          margin-bottom: 10px;
          background: #015DFF;
        }
      }
    }
  }
  .set-audit-dialog-body{
    padding: 27px 29px 5px;
    .select{
      margin-bottom: 27px;
      label{
        font-size: 14px;
        color: #333;
        font-weight: 400;
        line-height: 18px;
        vertical-align: top;
        input{
          margin-right: 11px;
          vertical-align: top;
        }
      }
    }
  }
  .set-audit-dialog-fotter{
    padding: 20px 0 22px;
    border-top: 1px solid #E9E9E9;
    text-align: center;
    .dialog-btn{
      width: 88px;
    }
    .dialog-btn.el-button--primary{
      margin-left: 20px;
      background-color: #015DFF;
    }
  }
  .set-position-dialog-body{
    max-height: 600px;
    overflow-y: auto;
    padding: 40px 30px;
    .department-item{
      margin-bottom: 30px;
    }
    .input{
      width: 340px;
      vertical-align: top;
    }
    .add-btn{
      width: 40px;
      height: 40px;
      padding: 0;
      margin-left: 10px;
      border-radius: 0;
      background-color: #eee;
      box-sizing: border-box;
      vertical-align: top;
      border-radius: 4px;
      .el-icon-plus{
        font-size: 28px;
        line-height: 38px;
        color: #B9B9B9;
      }
      &:hover{
        background-color: #015DFF;
        .el-icon-plus{
          color: #fff;
        }
      }
    }
    .label-list{
      margin-top: 17px;
      .label{
        position: relative;
        display: inline-block;
        max-width: 100%;
        height: 30px;
        padding: 4px 10px;
        margin: 0 10px 16px 0;
        background: #fff;
        border-radius: 4px;
        font-size: 12px;
        font-family: PingFangSC-Regular, PingFang SC;
        font-weight: 400;
        color: #9C9C9C;
        line-height: 22px;
        font-style: normal;
        border: 1px solid #ccc;
        box-sizing: border-box;
        // overflow: hidden;
        // text-overflow: ellipsis;
        .close{
          position: absolute;
          right: -8px;
          top: -8px;
          display: inline-block;
          font-size: 10px;
          color: #666;
          cursor: pointer;
        }
        &:hover{
          background: #015DFF;
          border: 1px solid #015DFF;
          color: #fff;
        }
      }
    }
  }
  .select-member-dialog-body{
    padding: 30px 64px 56px;
    .userImg{
      display: inline-block;
      width: 40px;
      height: 40px;
      margin-right: 20px;
      border-radius: 50%;
      overflow: hidden;
      vertical-align: middle;
      img{
        width: 100%;
        height: 100%;
      }
    }
    .userName{
      display: inline-block;
      font-size: 16px;
      font-weight: 500;
      color: #848484;
      line-height: 24px;
    }
    .userMsg{
      margin: 26px 0 40px 0;
      font-size: 14px;
      color: #1B1B1B;
      line-height: 24px;
    }
  }
}
</style>

<style lang="scss">
  .member-manage td{
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
</style>